const express = require('express')
const router = express.Router()
const { SysUserController } = require('../controller/sys_user')
const authMiddleware = require('../middleware/auth')
/* GET users listing. */
router.get('/v1/users/getCode', SysUserController.getCode)
router.post('/v1/users/login', SysUserController.login)
router.post('/v1/users/logout', authMiddleware, SysUserController.logout)
router.post('/v1/users/add', authMiddleware, SysUserController.userAdd)
router.put('/v1/users/edit', authMiddleware, SysUserController.userUpd)
router.delete('/v1/users/del', authMiddleware, SysUserController.userDel)
router.post('/v1/users/modify', authMiddleware, SysUserController.modifypwd)
module.exports = router
